<?php
include_once("functions/db_manipulate.php");

if (!init()) {
    redirect("login.php");
    exit();
}

?>

<meta charset="UTF-8">

<?php

connectDB();
startTransaction();

$resultSet = mysql_query("DELETE FROM users WHERE id = '" . mysql_real_escape_string($_GET['uid']) . "'") or die(mysql_error());

if ($resultSet) {
    commitTransaction();
} else {
    rollbackTransaction();
}

redirect($_SERVER['HTTP_REFERER']);
?>
